﻿using System;
using Microsoft.Xna.Framework;

namespace TD.TheGame
{
    class Level1 : Level
    {
        EnemySprite[] zombies = new EnemySprite[20];
        EnemySprite[] godzillas = new Godzilla[13];
        EnemySprite[] karatekas = new KarateKid[3];
        public Level1(Game game) : base(game)
        {
            for (int i = 0; i < zombies.Length; i++)
            {

                EnemySprite zombieSample1 = new Zombie(game,
                   new Vector2(game.Window.ClientBounds.Width, game.Window.ClientBounds.Height - random.Next(6, 12) * yDifference),
                   false,
                   400, SpriteEnumState.Normal,1);
                zombieSample1.Damage = 50;
                zombieSample1.Speed = 1;
                zombieSample1.Health = 25;
                zombies[i] = zombieSample1;
            }

            for (int i = 0; i < karatekas.Length; i++)
            {

                EnemySprite karatekaSample = new KarateKid(game,
                   new Vector2(game.Window.ClientBounds.Width, game.Window.ClientBounds.Height - random.Next(6, 12) * yDifference),
                   false,
                   400, SpriteEnumState.Normal, 1);
                karatekaSample.Damage = 50;
                karatekaSample.Speed = 1;
                karatekaSample.Health = 25;
                karatekas[i] = karatekaSample;
            }

            for (int i = 0; i < godzillas.Length; i++)
            {

                EnemySprite godzillaSample1 = new Godzilla(game,
                   new Vector2(game.Window.ClientBounds.Width, game.Window.ClientBounds.Height - random.Next(6, 12) * yDifference),
                   false,
                   400, SpriteEnumState.Normal,1);
                godzillaSample1.Damage = 70;
                godzillaSample1.Speed = 2;
                godzillaSample1.Health = 130;
                godzillas[i] = godzillaSample1;
            }

            //pirate = new Pirate(game, new Vector2(600, 200), true, 300, SpriteEnumState.Normal);
            ///pirate.Health = 100;
        }

        /// <summary>
        /// Adds all the enemies to the list. 
        /// </summary>
        public override void addToList()
        {
            foreach (var zombie in zombies)
            {
                Enemys.Add(zombie);
            }
            foreach (var godzilla in godzillas)
            {
                Enemys.Add(godzilla);
            }
            foreach (var karateka in karatekas)
            {
                Enemys.Add(karateka);
            }
            //Enemys.Add(pirate);
            //Enemys.Add(new Behemo(game, new Vector2(0, 0), true, 400));
            //Enemys.Add(new Godzilla(game, new Vector2(100, 0), true, 400));
            //Enemys.Add(new KarateKid(game, new Vector2(200, 0), true, 400));
            //Enemys.Add(new Knight(game, new Vector2(300, 0), true, 400));
            //Enemys.Add(new Pirate(game, new Vector2(400, 0), true, 400));
            //Enemys.Add(new Spearman(game, new Vector2(500, 0), true, 400));
            //Enemys.Add(new Sumo(game, new Vector2(600, 0), true, 400));
            //Enemys.Add(new Zombie(game, new Vector2(700, 0), true, 400));
        }
    }
}
